package org.acghub.mtdb.core.log.impl;

import org.acghub.mtdb.core.LogKey;
import org.acghub.mtdb.core.log.LogAbstractCollection;
import org.acghub.mtdb.core.log.LogAbstractList;

import java.util.List;

public final class LogLinkedList<E> extends LogAbstractList<E> {

    public LogLinkedList(LogKey logkey, List<E> wrapped) {
        super(logkey, wrapped);
    }

    private LogLinkedList(LogAbstractCollection<E> root, List<E> wrapped) {
        super(root, wrapped);
    }

    @Override
    public List<E> subList(int fromIndex, int toIndex) {
        return new LogLinkedList<>(this, wrapped().subList(fromIndex, toIndex));
    }
}
